<div class='modal' id='client-recharge-refund'>
	<div class='modal-dialog bc-detail'>
		<div class='weui-cells__title'>订单 #<order_id id='client-refund-order_id' modal=1></order_id></div>
		<div class="weui-form-preview">
			<div class="weui-form-preview__hd bc-input-focus">
				<label class="weui-form-preview__label">
					<unpaid modal=d >未付款订单 <small id='recharge-order-unpaid-refresh' class='weui-cell_link'>刷新 <i class='i i-refresh'></i></small></unpaid>
					<unpaid modal=none >订单金额</unpaid>
				</label>
				<em class="weui-form-preview__value" style='color:maroon;'>
					¥ <total_fee modal=f></total_fee>
				</em>
			</div>
			<div class="weui-form-preview__bd">
				<div class="weui-form-preview__item weui-flex-center">
					<label class="weui-form-preview__label">
						用户名
					</label>
					<span style="text-align: right" class="weui-flex__item weui-form-preview__value"> <user_name modal=1>用户名</user_name> <a mute>#<user_id modal=1 id='client-recharge-user_id'></user_id></a> <br/></span>
				</div>
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label" >电话</label>
					<span class="weui-form-preview__value"><tel modal=1></tel><br/></span>
				</div>
				<div class="weui-form-preview__item">
					<label class="weui-form-preview__label" >已退款</label>
					<span class="weui-form-preview__value"><refund_fee modal=f></refund_fee><br/></span>
				</div>
			</div>
		</div>
		<div class="weui-cells">
			<unpaid modal=none >
				<div class='weui-cell bc-input-focus'>
					<div class='weui-cell__hd'>
						<channel_icon modal=1></channel_icon> <small mute>原渠道退回</small>
					</div>
					<div class='weui-cell__bd'>
						<form submit='#client-recharge-refund-confirm'>
							<input autocomplete='off' id='client-recharge-refund_fee' detail=1 class='weui-input bc-modal-focus' type="tel" placeholder=""  style='text-align:right' ／>
						</form>
					</div>
				</div>
			</unpaid>
		</div>
		<div class="weui-cells">
			<unpaid modal=none >
				<div class="weui-form-preview__ft">
					<a modal='close' class="weui-form-preview__btn weui-form-preview__btn_default" href="javascript:">取消</a>
					<button id="client-recharge-refund-confirm" type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary" href="javascript:">确认退款</button>
				</div>
			</unpaid>
		</div>
	</div>
</div>
<script>
	$('#client-recharge-refund').on('bc-modal-success', function(event) {
		var total_fee = parseFloat($(this).find('total_fee').html().replace(/,/g,''));
		var refund_fee = parseFloat($(this).find('refund_fee').html().replace(/,/g,''));
		var refund_available = total_fee - refund_fee;
		refund_available = (refund_available.toFixed(2) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,');
		$("#client-recharge-refund_fee").val('')
		$("#client-recharge-refund_fee").attr('placeholder',"可退款金额："+refund_available)
	});
</script>